<template>
  <div class="app-container">
    <!-- 上部分表单 -->
    <el-form
      :model="queryParams"
      ref="queryForm"
      :inline="true"
      label-width="85px"
      class="globalSerchFormStyle"
      :rules="rules"
    >
      <el-row>
        <el-col
          :span="6"
          v-if="['', null, '7'].includes($store.state.user.userLevel)"
        >
          <el-form-item label="油企名称" prop="enterpriseId" size="small">
            <el-select
              style="width: 180px"
              v-model="queryParams.enterpriseId"
              :clearable="true"
              filterable
              placeholder="请选择油企"
              @change="handleSelectChange"
            >
              <el-option
                v-for="(item, index) in enterpriseList"
                :key="index"
                :value="item.enterpriseId"
                :label="item.enterpriseName"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="油站名称" prop="stationId" size="small">
            <el-select
              style="width: 180px"
              v-model="queryParams.stationId"
              :clearable="true"
              filterable
              placeholder="请选择油站名称"
            >
              <el-option
                v-for="item in stationList"
                :key="item.stationId"
                :label="item.stationName"
                :value="item.stationId"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="订单号" prop="orderNo">
            <el-input
              style="width: 180px"
              v-model="queryParams.orderNo"
              placeholder="请输入订单号"
              clearable
              @keyup.enter.native="handleQuery"
              size="small"
            />
          </el-form-item>
        </el-col>
        <el-col :span="6" v-if="authUser">
          <el-form-item label="合伙人" prop="orderNo">
            <el-select
              style="width: 180px"
              v-model="queryParams.partner"
              placeholder="请选择合伙人"
              clearable
              filterable
            >
              <el-option
                :value="ele.userId"
                v-for="ele in createByList"
                :label="ele.userName"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6" v-if="!authUser">
          <el-form-item label="客户手机号" prop="likeCustomerPhone">
            <el-input
              style="width: 180px"
              v-model="queryParams.likeCustomerPhone"
              placeholder="请输入客户手机号"
              clearable
              @keyup.enter.native="handleQuery"
              size="small"
            />
          </el-form-item>
        </el-col>
      </el-row>
      <div v-show="collapse">
        <el-row>
          <el-col :span="6" v-if="authUser">
            <el-form-item label="客户手机号" prop="likeCustomerPhone">
              <el-input
                style="width: 180px"
                v-model="queryParams.likeCustomerPhone"
                placeholder="请输入客户手机号"
                clearable
                @keyup.enter.native="handleQuery"
                size="small"
              />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="油号名称" prop="oilName" size="small">
              <el-select
                style="width: 180px"
                v-model="queryParams.oilName"
                placeholder="请选择油号"
                clearable
              >
                <el-option :value="undefined" selected>全部</el-option>
                <el-option
                  :value="ele.oilId"
                  v-for="ele in oilList"
                  :key="ele.oilId"
                  :label="ele.oilName + '-' + ele.oilClass + '-' + ele.oilType"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="油枪名称" prop="oilGun" size="small">
              <el-select
                style="width: 180px"
                v-model="queryParams.oilGun"
                :clearable="true"
                filterable
                placeholder="请选择油枪"
              >
                <el-option
                  v-for="(item, index) in oilGunList"
                  :key="index"
                  :value="item"
                  :label="item"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="支付方式" prop="payType" size="small">
              <el-select
                style="width: 180px"
                v-model="queryParams.payType"
                placeholder="请选择支付方式"
                clearable
                multiple
              >
              <el-option v-for="item in payList" :key="item.id" :value="item.payType" :label="item.payTypeName"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="6">
            <el-form-item label="订单状态" prop="status" size="small">
              <el-select
                style="width: 180px"
                v-model="queryParams.status"
                placeholder="请选择订单状态"
                clearable
                size="small"
              >
                <el-option :value="undefined" selected>全部</el-option>
                <el-option value="0" label="未支付"></el-option>
                <el-option value="1" label="已支付"></el-option>
                <el-option value="2" label="线下退款"></el-option>
                <el-option value="3" label="线上退款"></el-option>
                <el-option value="4" label="支付失败"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="加油员" prop="oilPersonnelId" size="small">
              <el-select
                style="width: 180px"
                v-model="queryParams.oilPersonnelId"
                :clearable="true"
                filterable
                placeholder="请选择加油员"
              >
                <el-option
                  v-for="item in personnelList"
                  :key="item.userId"
                  :label="item.userName"
                  :value="item.userId"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="创建时间" prop="createdDate" size="small">
              <el-date-picker
                size="small"
                v-model="dateRangeCreatedDate"
                value-format="yyyy-MM-dd HH:mm:ss"
                type="datetimerange"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
                style="width: 180px"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="开票状态" prop="invoiceStatus" size="small">
              <el-select
                style="width: 180px"
                v-model="queryParams.invoiceStatus"
                :clearable="true"
                filterable
                placeholder="请选择"
              >
                <el-option label="未开票" value="0"></el-option>
                <el-option label="已开票" value="1"></el-option>
                <el-option label="部分开票" value="2"></el-option>
                <el-option label="不支持开票" value="3"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="6">
            <el-form-item label="小票状态" prop="isPrint" size="small">
              <el-select
                style="width: 180px"
                v-model="queryParams.isPrint"
                placeholder="请选择小票状态"
                clearable
                size="small"
              >
                <el-option value="0" label="未打印"></el-option>
                <el-option value="1" label="已打印"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="订单来源" size="small" prop="utmSource">
              <el-select
                style="width: 180px"
                v-model="queryParams.utmSource"
                placeholder="请选择订单来源"
                clearable
                size="small"
              >
                <el-option value="1" label="扫码订单"></el-option>
                <el-option value="2" label="平台订单"></el-option>
                <el-option value="3" label="无感订单"></el-option>
                <el-option value="9" label="其他订单"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="应付金额" size="small" prop="amtDue">
              <el-input
                v-model="queryParams.beginReceivableAmt"
                class="amt_sty"
                @input="handleAmtInput('beginReceivableAmt', $event)"
              >
              </el-input>
              元-
              <el-input
                v-model="queryParams.endReceivableAmt"
                class="amt_sty"
                @input="handleAmtInput('endReceivableAmt', $event)"
              ></el-input>
              元
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="实付金额" size="small" prop="amt">
              <el-input
                v-model="queryParams.beginAmt"
                class="amt_sty"
                @input="handleAmtInput('beginAmt', $event)"
              >
              </el-input>
              元-
              <el-input
                v-model="queryParams.endAmt"
                class="amt_sty"
                @input="handleAmtInput('endAmt', $event)"
              ></el-input>
              元
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="6">
            <el-form-item label="支付时间" size="small" prop="amt">
              <el-date-picker
                v-model="paymentTime"
                align="right"
                value-format="yyyy-MM-dd HH:mm:ss"
                type="datetimerange"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
                style="width: 180px"
                :default-time="['00:00:00', '23:59:59']"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
      </div>
    </el-form>

    <el-row
      class="global_el_rowStyle"
      :gutter="10"
      style="
        border-top: none;
        border-bottom: 1px solid #f5f5f5;
        margin-top: 0px;
      "
    >
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-search"
          @click="handleQuery"
          size="mini"
          >搜索</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          @click="resetQuery"
          size="mini"
          icon="el-icon-refresh"
          plain
          >重置</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          plain
          size="mini"
          id="closeSearchBtn"
          @click="
            (closeSearch) => {
              collapse = !collapse;
            }
          "
        >
          {{ collapse ? "收起" : "展开更多" }}
          <i :class="collapse ? 'el-icon-arrow-up ' : 'el-icon-arrow-down'"></i>
        </el-button>
      </el-col>
      <!-- <el-col :span="1.5" v-if="!authUser">
        <el-button
          icon="el-icon-tickets"
          size="mini"
          plain
          @click="gotoEditOrderDiscount"
        >
          优惠调整
        </el-button>
      </el-col> -->
      <!-- <el-col :span="1.5">
        <el-button
          plain
          :disabled="delIds.length < 1"
          icon="el-icon-delete"
          size="mini"
          @click="handleDeleteAll"
          >撤销</el-button
        >
      </el-col> -->
      <el-col :span="1.5">
        <el-button
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          plain
          >导出</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button size="mini" @click="isDrawer = true" plain
          >自定义表头</el-button
        >
      </el-col>
    </el-row>
    <div style="width: 90%; margin: 20px 0px">
      <el-row :gutter="20">
        <el-col :span="5">
          <div class="order-fz order-text-border">
            应收总计：<span class="order-text-color"
              >{{ orderSum.receivableAmt }}元</span
            >
          </div>
        </el-col>
        <el-col :span="5">
          <div class="order-fz order-text-border">
            实收总计：<span class="order-text-color"
              >{{ orderSum.ssAmt }}元</span
            >
          </div>
        </el-col>
        <!-- <el-col :span="5">
          <div class="order-fz order-text-border">
            提现总计：<span class="order-text-color">-------元</span>
          </div>
        </el-col> -->
        <el-col :span="5">
          <div class="order-fz order-text-border">
            数量总计(L/kg)：<span class="order-text-color"
              >{{ orderSum.orderLiters }} (L/kg)</span
            >
          </div>
        </el-col>
        <el-col :span="5">
          <div class="order-fz">
            订单数：<span class="order-text-color"
              >{{ orderSum.countNum }}笔</span
            >
          </div>
        </el-col>
        <!-- <el-col :span="4">
          <div class="order-fz order-text-border">
            加油用户数：<span class="order-text-color">0人</span>
          </div>
        </el-col>
        <el-col :span="4">
          <div class="order-fz">
            余额支付金额：<span class="order-text-color">0元</span>
          </div>
        </el-col> -->
      </el-row>
    </div>
    <!-- <el-form :model="orderSum" ref="orderSum" :inline="true" label-width="128px">
      <el-form-item label="实收总计" prop="amt">
        <div style="font-size: 1.5vw"> {{ orderSum.ssAmt }}元</div>
      </el-form-item>
      <el-form-item label="应收总计" prop="receivableAmt">
        <div style="font-size: 1.5vw"> {{ orderSum.receivableAmt }}元</div>
      </el-form-item>
      <el-form-item label="升数总计" prop="orderLiters">
        <div style="font-size: 1.5vw"> {{ orderSum.orderLiters }}升</div>
      </el-form-item>
      <el-form-item label="订单数" prop="countNum">
        <div style="font-size: 1.5vw"> {{ orderSum.countNum }}</div>
      </el-form-item>
    </el-form> -->

    <!-- 表格 -->
    <el-table
      v-if="checkedTitles2.length"
      stripe
      style="width: 100%"
      :data="orderList"
      @selection-change="handleSelectionChange"
      v-loading="loading"
    >
      <af-table-column
        v-if="false"
        label="订单id"
        align="left"
        prop="orderId"
      />
      <el-table-column type="selection" width="55" />
      <template v-for="id in checkedTitles2">
        <af-table-column
          label="应付金额(元)"
          align="center"
          prop="receivableAmt"
          sortable
          v-if="id == 1"
        />
        <af-table-column
          label="实付金额(元)"
          align="center"
          prop="amt"
          sortable
          v-if="id == 2"
        />
        <af-table-column
          label="充值立减优惠金额(元)"
          align="center"
          prop="rechargeDiscountAmt"
          width="180"
          sortable
          v-if="id == 3 && userLevel === null"
        />
        <af-table-column
          label="消费立减优惠金额(元)"
          align="center"
          prop="consumeDiscountAmt"
          v-if="id == 4 && userLevel === null"
          width="180"
          sortable
        />
        <af-table-column
          label="立减优惠金额(元)"
          align="center"
          prop="discountAmt"
          width="170"
          sortable
          v-if="id == 5"
        />
        <af-table-column
          label="优惠券金额(元)"
          align="center"
          prop="discountCouponAmt"
          width="160"
          sortable
          v-if="id == 6"
        />
        <af-table-column
          v-if="id == 31"
          label="议价优惠金额（元）"
          align="center"
          prop="bargainDiscountAmt"
          width="180"
          sortable
        />
        <af-table-column
          v-if="id == 30"
          label="返利金额优惠（元）"
          align="center"
          prop="returnCashAmt"
          width="180"
          sortable
        />
        <af-table-column
          v-if="id == 33"
          label="积分抵扣金额（元）"
          align="center"
          prop=""
          width="180"
          sortable
        />
        <af-table-column
          v-if="id == 7 && authUser"
          label="提现(元)"
          align="center"
          prop="withdrawalAmount"
          width="100"
          sortable
        />
        <af-table-column
          label="支付时间"
          align="center"
          prop="payDate"
          width="120"
          sortable
          v-if="id == 8"
        >
          <template slot-scope="scope">
            <span>{{
              parseTime(scope.row.payDate, "{y}-{m}-{d} {h}:{i}:{s}")
            }}</span>
          </template>
        </af-table-column>
        <af-table-column
          label="创建时间"
          align="center"
          prop="createdDate"
          width="120"
          sortable
          v-if="id == 9"
        >
          <template slot-scope="scope">
            <span>{{
              parseTime(scope.row.createdDate, "{y}-{m}-{d} {h}:{i}:{s}")
            }}</span>
          </template>
        </af-table-column>
        <af-table-column
          label="订单状态"
          align="center"
          prop="status"
          :formatter="statusFotmat"
          width="130"
          sortable
          v-if="id == 10"
        />
        <af-table-column
          label="客户手机号"
          align="center"
          width="170"
          prop="customerPhone"
          sortable
          v-if="id == 11"
        >
        </af-table-column>

        <af-table-column
          label="客户姓名"
          align="center"
          width="180"
          prop="consumer"
          sortable
          v-if="id == 12"
        />
        <af-table-column
          v-if="id == 13 && authUser"
          label="合伙人"
          align="center"
          width="200"
          show-overflow-tooltip
          prop="partner"
        />
        <af-table-column
          v-if="
            id == 14 && ['', null, '7'].includes($store.state.user.userLevel)
          "
          label="油企名称"
          align="center"
          width="200"
          show-overflow-tooltip
          prop="enterpriseName"
        />
        <af-table-column
          label="油站名称"
          align="center"
          width="200"
          show-overflow-tooltip
          prop="stationName"
          v-if="(jiBie == 0 || jiBie == 1) && id == 15"
          sortable
        />
        <af-table-column
          label="油号名称"
          align="center"
          prop="oilName"
          width="120"
          sortable
          v-if="id == 16"
        />
        <af-table-column
          label="油品价格(元)"
          align="center"
          prop="oilPirce"
          sortable
          v-if="id == 17"
        />
        <af-table-column
          label="数量(L/kg)"
          align="center"
          prop="orderLiters"
          sortable
          v-if="id == 18"
        />
        <af-table-column
          label="加油员"
          align="center"
          width="200"
          prop="oilPersonnel"
          sortable
          v-if="id == 19"
        />
        <af-table-column
          label="油枪名称"
          align="center"
          width="180"
          prop="oilGun"
          sortable
          v-if="id == 20"
        />
        <af-table-column
          label="支付方式"
          align="center"
          width="160"
          prop="payType"
          :formatter="payTypeFotmat"
          sortable
          v-if="id == 21"
        />

        <af-table-column
          label="订单号"
          align="center"
          prop="orderNo"
          width="120"
          sortable
          v-if="id == 22"
        />
        <af-table-column
          label="消费主卡手机号"
          align="center"
          prop="deputyMobilePhone"
          width="220"
          sortable
          v-if="id==32"
        />
        <af-table-column
          label="小票状态"
          align="center"
          width="160"
          prop="isPrint"
          sortable
          v-if="id == 23"
        >
          <template slot-scope="scope">
            <span v-if="scope.row.isPrint === 0">未打印</span>
            <span v-else-if="scope.row.isPrint === 1">已打印</span>
          </template>
        </af-table-column>

        <af-table-column
          label="开票状态"
          width="130"
          align="left"
          prop="invoiceStatus"
          :formatter="invoiceStatusFotmat"
          sortable
          v-if="id == 24"
        />
        <af-table-column
          label="订单来源"
          width="180"
          align="center"
          prop="utmSource"
          sortable
          v-if="id == 25"
        >
          <template slot-scope="scope">
            <span v-if="scope.row.utmSource === '1'">扫码订单</span>
            <span v-if="scope.row.utmSource === '2'">平台订单</span>
            <span v-if="scope.row.utmSource === '3'">无感订单</span>
            <span v-if="scope.row.utmSource === '9'">其他订单</span>
          </template>
        </af-table-column>
        <af-table-column
          v-if="id == 26 && authUser"
          label="通道费承担方"
          align="left"
          prop="channelFeePayer"
          width="150"
          sortable
        >
          <template slot-scope="scope">
            <span v-if="scope.row.channelFeePayer == 0">司机</span>
            <span v-if="scope.row.channelFeePayer == 1">油企</span>
          </template>
        </af-table-column>
        <af-table-column
          v-if="id == 27 && authUser"
          label="费率"
          align="left"
          prop="serviceCharge"
          sortable
        >
          <template slot-scope="scope">
            <span>{{ scope.row.serviceCharge }}‰</span>
          </template>
        </af-table-column>
        <af-table-column
          label="商户号"
          align="center"
          prop="mno"
          width="170"
          sortable
          v-if="id == 28"
        />
        <af-table-column
          label="商户号备注"
          align="center"
          prop="remark"
          width="170"
          sortable
          v-if="id == 29"
        />
      </template>
      <af-table-column
        label="操作"
        align="left"
        class-name="small-padding fixed-width"
        width="200px"
        fixed="right"
      >
        <template slot-scope="scope">
          <el-button size="mini" type="text" @click="handleDetails(scope.row)"
            >查看详情</el-button
          >
          <el-button
            v-if="scope.row.status === '1'"
            size="mini"
            type="text"
            icon="el-icon-plus"
            @click="printOrderInfo(scope.row)"
            >补打小票</el-button
          >
          <el-button
            v-else
            style="color: #ccc; cursor: not-allowed"
            size="mini"
            type="text"
            icon="el-icon-plus"
            >补打小票</el-button
          >
          <el-button
            size="mini"
            type="text"
            @click="showInvoiceList(scope.row)"
          >
            开票记录
          </el-button>
        </template>
      </af-table-column>
    </el-table>
    <div v-else>
      <el-table class="table2" border style="height: 400px"></el-table>
    </div>
    <!-- 分页 -->
    <pagination
      v-show="total > 0 && checkedTitles2.length"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <!-- 自定义表头 -->
    <el-drawer
      class="drawer_title"
      title="自定义表头"
      :visible.sync="isDrawer"
      :direction="direction"
      :before-close="handleClose"
    >
      <div>
        <el-checkbox
          class="checkAll"
          :indeterminate="isIndeterminate"
          v-model="checkAll"
          @change="handleCheckAllChange"
          >全选/全不选</el-checkbox
        >
        <div style="margin: 15px 0"></div>
        <el-checkbox-group
          class="checkouBox_group"
          v-model="checkedTitles"
          @change="handleCheckedTitlesChange"
        >
          <el-checkbox
            v-for="item in titleList"
            :label="item.id"
            :key="item.id"
            >{{ item.text }}</el-checkbox
          >
        </el-checkbox-group>
        <div class="action_btn">
          <p @click="onEnsure">确定</p>
          <p @click="handleCancel">取消</p>
        </div>
      </div>
    </el-drawer>
    <!-- 订单详情 -->
    <el-drawer
      class="drawer_title2"
      title="订单详情"
      size="45%"
      :visible.sync="drawerOrder"
      :direction="direction"
    >
      <div class="drawer_content">
        <div>
          <p class="order_info">订单信息</p>
          <el-form class="el_form">
            <el-row>
              <el-col :span="8">
                <el-form-item label="订单号:">{{
                  orderIdDetails.orderNo
                }}</el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="商户号:">{{
                  orderIdDetails.mno
                }}</el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="商户号备注:">{{
                  orderIdDetails.remark
                }}</el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="8">
                <el-form-item label="应付金额:"
                  >{{ orderIdDetails.receivableAmt }}元</el-form-item
                >
              </el-col>
              <el-col :span="8">
                <el-form-item label="实付金额:"
                  >{{ orderIdDetails.amt }}元</el-form-item
                >
              </el-col>
              <el-col :span="8">
                <el-form-item label="立减优惠金额:"
                  >{{ orderIdDetails.discountAmt }}元</el-form-item
                >
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="8">
                <el-form-item label="优惠券金额:"
                  >{{ orderIdDetails.discountCouponAmt }}元</el-form-item
                >
              </el-col>
              <el-col :span="8">
                <el-form-item label="返利优惠金额:"
                  >{{ orderIdDetails.returnCashAmt || 0 }}元</el-form-item
                >
              </el-col>
              <el-col :span="8">
                <el-form-item label="议价优惠金额:"
                  >{{ orderIdDetails.bargainDiscountAmt || 0 }}元</el-form-item
                >
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="8">
                <el-form-item label="开票状态:">{{
                  orderIdDetails.invoiceStatus == 0
                    ? "未开票"
                    : orderIdDetails.invoiceStatus == 1
                    ? "已开票"
                    : orderIdDetails.invoiceStatus == 2
                    ? "部分开票"
                    : orderIdDetails.invoiceStatus == 3
                    ? "不支持开票"
                    : "-"
                }}</el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="订单状态:">{{
                  orderIdDetails.status == 0 ? "未支付" : "已支付"
                }}</el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="支付方式:">{{
                  payTypeFotmat(orderIdDetails)
                }}</el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="8">
                <el-form-item label="订单来源:">{{
                  orderIdDetails.utmSource == 1
                    ? "扫码订单"
                    : orderIdDetails.utmSource == 2
                    ? "繁星订单"
                    : orderIdDetails.utmSource == 9
                    ? "其他订单"
                    : "-"
                }}</el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="小票状态:">{{
                  orderIdDetails.isPrint == 0
                    ? "未开票"
                    : orderIdDetails.isPrint == 1
                    ? "已开票"
                    : orderIdDetails.isPrint == 2
                    ? "部分开票"
                    : orderIdDetails.isPrint == 3
                    ? "不支持开票"
                    : "-"
                }}</el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="创建时间:">{{
                  orderIdDetails.createdDate
                }}</el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="8">
                <el-form-item label="支付时间:">{{
                  orderIdDetails.payDate
                }}</el-form-item>
              </el-col>
            </el-row>
          </el-form>
        </div>
        <div>
          <p class="order_info">加油信息</p>
          <el-form class="el_form">
            <el-row>
              <el-col :span="8">
                <el-form-item label="油站名称:">{{
                  orderIdDetails.stationName
                }}</el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="加油员:">{{
                  orderIdDetails.oilPersonnel
                }}</el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="油枪名称:">{{
                  orderIdDetails.oilGun
                }}</el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="8">
                <el-form-item label="油号名称:">{{
                  orderIdDetails.oilName
                }}</el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="油品价格:"
                  >{{ orderIdDetails.oilPirce || 0 }}元</el-form-item
                >
              </el-col>
              <el-col :span="8">
                <el-form-item label="数量:"
                  >{{ orderIdDetails.orderLiters }}L/kg</el-form-item
                >
              </el-col>
            </el-row>
          </el-form>
        </div>
        <div>
          <p class="order_info">客户信息</p>
          <el-form class="el_form">
            <el-row>
              <el-col :span="8">
                <el-form-item label="客户姓名:">{{
                  orderIdDetails.consumer
                }}</el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="客户手机号:">{{
                  orderIdDetails.customerPhone
                }}</el-form-item>
              </el-col>
            </el-row>
          </el-form>
        </div>
      </div>
      <div class="close_btn"><p @click="drawerOrder = false">关闭</p></div>
    </el-drawer>
    <!-- 修改订单抽屉 -->
    <Order_DiscountAmount_Drawer
      :editDiscountDialog.sync="editDiscountDialog"
      @reloadData="getList"
    ></Order_DiscountAmount_Drawer>

    <!-- 开票记录 -->
    <InvoiceRecord
      :invoiceDialog.sync="invoiceDialog"
      :currentRowData="currentRowData"
    ></InvoiceRecord>
  </div>
</template>
<script>
import { getGunList, getFirstAccount } from "@/api/station/order";
import { timeComparison } from "@/utils/timeConversion";
import { cloneDeep } from "lodash";
import {
  listOrder,
  exportOrder,
  printOrderInfo,
  selectSumPayOrder,
  delOrderDeletePay,
  enterpriseList,
} from "@/api/station/orderHistory";
import { listPrice, getPrice } from "@/api/station/price";
import { listManage, feieList } from "@/api/station/manage";
import {
  getStationList,
  listEnterpriseStation,
  getStationByEnterprise,
} from "@/api/dept";
import getUserProfileName from "@/utils/getUserProfile";
import { getOilListByLogin } from "@/api/dept";
import {
  listPersonnel,
  listEnterpriseUser,
  listQuery,
} from "@/api/station/personnel";
import {
  addOrderFields,
  getOrderFields,
  getPayTypeListApi,
  getOrderDetailsApi,
} from "@/api/station/order";
import Order_DiscountAmount_Drawer from "./Order_DiscountAmount_Drawer.vue";
import InvoiceRecord from "./invoice_record.vue";
import { mapState } from "vuex";
export default {
  name: "Order_Oil",
  components: { Order_DiscountAmount_Drawer, InvoiceRecord },
  data() {
    var validateAmt = (rule, value, callback) => {
      const reg = /^\d+(\.\d{1,2})?$/; // 匹配最多两位小数的数字
      if (
        this.queryParams.beginAmt !== "" &&
        !reg.test(this.queryParams.beginAmt) &&
        this.queryParams.beginAmt !== null
      ) {
        this.queryParams.beginAmt = this.queryParams.beginAmt.replace(
          /[^\d.]/g,
          ""
        );
      }
      if (
        this.queryParams.endAmt !== "" &&
        !reg.test(this.queryParams.endAmt) &&
        this.queryParams.endAmt !== null
      ) {
        this.queryParams.endAmt = this.queryParams.endAmt.replace(
          /[^\d.]/g,
          ""
        );
      }
      if (
        this.queryParams.endAmt &&
        this.queryParams.beginAmt &&
        +this.queryParams.endAmt < +this.queryParams.beginAmt
      ) {
        callback(new Error("范围不合理"));
      }
      callback();
    };
    var validateAmtDue = (rule, value, callback) => {
      const reg = /^\d+(\.\d{1,2})?$/; // 匹配最多两位小数的数字
      if (
        this.queryParams.beginReceivableAmt !== "" &&
        !reg.test(this.queryParams.beginReceivableAmt) &&
        this.queryParams.beginReceivableAmt !== null
      ) {
        this.queryParams.beginReceivableAmt =
          this.queryParams.beginReceivableAmt.replace(/[^\d.]/g, "");
      }
      if (
        this.queryParams.endReceivableAmt !== "" &&
        !reg.test(this.queryParams.endReceivableAmt) &&
        this.queryParams.endReceivableAmt !== null
      ) {
        this.queryParams.endReceivableAmt =
          this.queryParams.endReceivableAmt.replace(/[^\d.]/g, "");
      }
      if (
        this.queryParams.endReceivableAmt &&
        this.queryParams.beginReceivableAmt &&
        +this.queryParams.endReceivableAmt <
          +this.queryParams.beginReceivableAmt
      ) {
        callback(new Error("范围不合理"));
      }

      callback();
    };
    return {
      createByList: [],
      // 支付时间
      paymentTime: [],
      collapse: false,
      //创建订单时间间隔
      dateRangeCreatedDate: [],
      // 总条数
      total: 0,
      // 订单支付表格数据
      orderList: [],
      oilNameOptions: [],
      // 字典
      payTypeOptions: [],
      // 下拉油站
      stationOptions: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        // 客户手机号
        likeCustomerPhone: null,
        // 开票状态
        invoiceStatus: null,
        // 小票状态
        isPrint: null,
        levelId: this.levelId,
        pageNum: 1,
        pageSize: 10,
        status: null,
        oilGun: null,
        oilName: null,
        partner: null,
        orderType: null,
        //orderType:1,
        oilPersonnel: null,
        createdDate: null,
        likeConsumer: null,
        orderNo: null,
        customerPhone: null,
        stationId: null,
        enterpriseId: null,
        oilPersonnelId: null,
        // 支付方式多选框
        payType: [],
        // 订单来源
        utmSource: null,
        beginReceivableAmt: null, // 应付金额
        endReceivableAmt: null, // 应付金额
        beginAmt: null, // 实付金额
        endAmt: null, // 实付金额
        // 支付时间开始时间
        beginPayTime: null,
        // 支付时间结束时间
        endPayTime: null,
      },
      orderSum: {
        amt: null,
        receivableAmt: null,
        orderLiters: null,
        countNum: null,
      },
      // 表单校验
      rules: {
        amtDue: [{ validator: validateAmtDue, trigger: "blur" }],
        amt: [{ validator: validateAmt, trigger: "blur" }],
      },
      reprint: false,
      oilList: [],
      operation: 1,
      stationList: [],
      personnelList: [],
      delIds: [],
      oilGunList: [],
      enterpriseList: [],
      loading: false,
      editDiscountDialog: false, // 优惠调整抽屉
      invoiceDialog: false, // 开票记录弹框
      currentRowData: {}, // 当前选中行数据
      isDrawer: false, //是否展示自定义表头
      isIndeterminate: false,
      checkAll: true,
      direction: "rtl",
      checkedTitles: [], //绑定的表头字段
      checkedTitles2: [], //页面展示字段
      titleList: [
        { id: 1, text: "应付金额（元）" },
        { id: 2, text: "实付金额（元）" },
        { id: 3, text: "充值立减优惠金额（元）" },
        { id: 4, text: "消费立减优惠金额（元）" },
        { id: 5, text: "立减优惠金额（元）" },
        { id: 6, text: "优惠券金额（元）" },
        { id: 7, text: "提现（元）" },
        { id: 8, text: "支付时间" },
        { id: 9, text: "创建时间" },
        { id: 10, text: "订单状态" },
        { id: 11, text: "客户手机号" },
        { id: 12, text: "客户姓名" },
        { id: 13, text: "合伙人" },
        { id: 14, text: "油企名称" },
        { id: 15, text: "油站名称" },
        { id: 16, text: "油号名称" },
        { id: 17, text: "油品价格（元）" },
        { id: 18, text: "数量（L/kg）" },
        { id: 19, text: "加油员" },
        { id: 20, text: "油枪名称" },
        { id: 21, text: "支付方式" },
        { id: 22, text: "订单号" },
        { id: 23, text: "小票状态" },
        { id: 24, text: "开票状态" },
        { id: 25, text: "订单来源" },
        { id: 26, text: "通道费承担方" },
        { id: 27, text: "费率" },
        { id: 28, text: "商户号" },
        { id: 29, text: "商户号备注" },
        { id: 30, text: "返利金额优惠（元）" },
        { id: 31, text: "议价优惠金额（元）" },
        { id: 32, text: "消费主卡手机号" },
        // { id: 33, text: "积分抵扣金额（元）" },
      ],
      drawerOrder: false,
      payList: [], //自定义支付方式
      orderIdDetails: {}, //订单详情
    };
  },
  async created() {
    this.getCreateBy();
    await this.getShowData();
    this.getList();
    this.getOilList();
    this.getPersonnelList();
    this.getOilListData();
    this.getEnterpriseList(); // 获取油企数据
    this.getPayType()
    if (!["", null, "7"].includes(this.$store.state.user.userLevel)) {
      this.getStationList(this.presentEnterprise?.enterpriseId);
    }
    feieList({
      pageNum: 1,
      pageSize: 1,
    }).then((response) => {
      const equipmentList = response.rows;
      if (!!equipmentList) {
        if ((equipmentList[0] || {}).deviceType == "3") {
          this.reprint = true;
        }
      }
    });
    //字典
    // this.getDicts("pay_type").then((response) => {
    //   this.payTypeOptions = response.data;
    // });
    // this.getDicts("oil_name").then((response) => {
    //   this.oilNameOptions = response.data;
    // });
  },
  mounted() {
    this.getFields();
  },
  computed: {
    ...mapState({
      userLevel: (state) => state.user.userLevel,
    }),
    authUser() {
      let roles = this.$store.state.user.roles;
      if (roles.includes("admin")) {
        return true;
      } else {
        return false;
      }
    },
  },
  methods: {
    // 查询合伙人列表
    async getCreateBy() {
      const res = await getFirstAccount();
      this.createByList = res.data;
    },
    //获取自定义支付方式
    async getPayType() {
      const res = await getPayTypeListApi();
      if (res && res.code == 200) {
        this.payList = (res && res.data.list) || [];
      } else {
        this.$message.error(res && res.msg);
      }
    },
    // 订单详情
    async handleDetails(row) {
      this.drawerOrder = true;
      this.orderIdDetails = row;
      // const res = await getOrderDetailsApi({ orderId: row.orderId });
      // if(res&&res.code==200){
      //   // this.orderIdDetails = res.data;
      //   this.orderIdDetails=row
      // }
    },
    // 查询油枪列表
    async getOilListData() {
      const res = await getGunList();
      this.oilGunList = res.data;
    },
    handleAmtInput(field, event) {
      let value = event.replace(/[^\d.]/g, "");
      const decimalIndex = value.indexOf(".");
      if (decimalIndex !== -1) {
        this.queryParams[field] = value.substring(0, decimalIndex + 3);
      } else {
        this.queryParams[field] = value;
      }
    },
    // 根据油企获取该油企下的油站
    handleSelectChange(enterpriseId) {
      this.stationList = [];
      this.queryParams.stationId = null;
      this.getStationList(enterpriseId);
    },
    // 查询油企
    getEnterpriseList() {
      enterpriseList().then((res) => {
        this.enterpriseList = res.rows;
      });
    },
    // 勾选表格
    handleSelectionChange(selection) {
      this.delIds = selection.map((item) => {
        return item.orderId;
      });
    },
    // 批量删除
    handleDeleteAll() {
      this.$confirm(`确认撤销勾选的订单吗？`).then(() => {
        delOrderDeletePay(this.delIds).then((res) => {
          if (res && res.code === 200) {
            this.$message.success(res.msg);
            this.delIds = [];
            this.getList();
          } else {
            this.$message.error(res.msg);
          }
        });
      });
    },

    getOilList() {
      getOilListByLogin()
        .then((res) => {
          if (res.code == 200) {
            this.oilList = res.rows;
          } else {
            throw new Error("");
          }
        })
        .catch(() => {
          this.msgError("拉取油品列表失败，请刷新网页~");
        });
    },
    getPersonnelList() {
      let userLevelIs = this.$store.state.user.userLevel;
      if (["5", "6"].includes(userLevelIs)) {
        listEnterpriseUser().then((res) => {
          this.personnelList = res;
        });
      } else {
        let data = { data: null };
        let userLevel = this.$store.state.user.userLevel;
        if (userLevel === "0") {
          // console.log("111admin账号");
        } else if (userLevel === "1") {
          data = {
            enterpriseId:
              this.presentEnterprise && this.presentEnterprise.enterpriseId,
          };
        } else if (userLevel === "2") {
          data = {
            enterpriseId:
              this.presentEnterprise && this.presentEnterprise.enterpriseId,
            stationId: this.$store.state.user.stationId,
          };
        } else {
          // console.log("111admin账号");
        }
        listQuery(data).then((res) => {
          this.personnelList = res.rows;
        });
      }
    },
    payTypeFotmat(row, column) {
      const types = {
        wx: "微信支付",
        zfb: "支付宝",
        xj: "现金支付",
        dzk: "电子卡支付",
        pos: "POS机支付",
        yzf: "预支付",
        kbzf: "卡包支付",
        cdk: "车队卡支付",
        dkq: "实体卡支付",
        yhk: "银行卡支付",
      };
      if (types[row.payType]) {
        return types[row.payType];
      } else {
        return row.payTypeName;
      }
    },
    statusFotmat(row, column) {
      if (row.status === "0") {
        return "未支付";
      } else if (row.status === "1") {
        return "已支付";
      } else if (row.status === "2") {
        return "线下退款";
      } else if (row.status === "3") {
        return "线上退款";
      } else if (row.status === "4") {
        return "支付失败";
      }
    },

    // 格式化开票状态
    invoiceStatusFotmat(row, column) {
      const types = {
        0: "未开票",
        1: "已开票",
        2: "部分开票",
        3: "不支持开票",
      };
      return types[row.invoiceStatus];
    },

    async getStationList(enterpriseId) {
      // 判断是不是admin账号
      const isDelete = await getUserProfileName();
      if (isDelete) {
        // 是
        listEnterpriseStation({ enterpriseId: enterpriseId }).then((res) => {
          this.stationList = res;
        });
      } else {
        // 不是
        const res = await getStationByEnterprise({
          enterpriseId: enterpriseId,
        });
        this.stationList = res.data;
      }
    },
    /** 查询订单支付列表 */
    getList() {
      this.loading = true;
      this.queryParams.levelId = this.levelId;
      let queryParams = cloneDeep(this.queryParams);
      let userLevel = this.$store.state.user.userLevel;
      if (["1", "2", "5", "6"].includes(userLevel)) {
        queryParams.isDeleted = 0;
      }
      queryParams.payType.forEach((item) => {
        if (item === "qb") {
          queryParams.payType = [];
        }
      });

      let beginPayTime;
      let endPayTime;
      if (this.paymentTime) {
        // 支付时间开始时间
        beginPayTime = this.paymentTime[0];
        // 支付时间结束时间
        endPayTime = this.paymentTime[1];
      } else {
        // 支付时间开始时间
        beginPayTime = null;
        // 支付时间结束时间
        endPayTime = null;
      }

      const data = this.addDateRange(
        {
          ...queryParams,
          payTypeList: queryParams.payType.join(),
          payType: null,
          // 支付时间开始时间
          beginPayTime,
          // 支付时间结束时间
          endPayTime,
        },
        this.dateRangeCreatedDate
      );

      // const time = timeComparison(
      //   "earching",
      //   data.beginTime,
      //   data.endTime,
      //   data.beginPayTime,
      //   data.endPayTime
      // );
      // if (!time) return (this.loading = false);

      listOrder(data)
        .then((response) => {
          this.orderList = response.rows;
          this.total = response.total;
          this.loading = false;
        })
        .catch(() => {
          this.loading = false;
        });
      selectSumPayOrder(data).then((response) => {
        this.orderSum = this.initData(response.data);
      });
    },
    initData(data) {
      let queryData = data;
      Object.keys(queryData).forEach((key) => {
        if (["ssAmt", "receivableAmt", "orderLiters"].includes(key)) {
          if (
            queryData[key] === "" ||
            queryData[key] === undefined ||
            !queryData[key]
          ) {
            queryData[key] = 0;
          }
        }
      });
      return queryData;
    },
    /** 搜索按钮操作 */
    async handleQuery() {
      this.queryParams.pageNum = 1;
      await this.$refs["queryForm"].validate();
      this.getList();
    },
    /** 重置按钮操作 */
    async resetQuery() {
      this.queryParams.utmSource = null;
      this.paymentTime = [];
      this.dateRangeCreatedDate = [];
      // await this.$refs['queryForm'].resetFields()
      this.queryParams.beginReceivableAmt = null;
      this.queryParams.endReceivableAmt = null;
      this.queryParams.beginAmt = null;
      this.queryParams.endAmt = null;
      this.queryParams.partner = null;
      this.resetForm("queryForm");
      this.handleQuery();
    },
    //打印订单小票
    printOrderInfo(row) {
      printOrderInfo({ orderId: row.orderId }).then((response) => {
        this.msgSuccess("小票打印成功");
      });
    },
    /** 导出按钮操作 */
    handleExport() {
      let beginTime;
      let endTime;

      let beginPayTime;
      let endPayTime;
      if (this.dateRangeCreatedDate) {
        beginTime = this.dateRangeCreatedDate[0];
        endTime = this.dateRangeCreatedDate[1];
      } else {
        beginTime = null;
        endTime = null;
      }
      if (this.paymentTime) {
        beginPayTime = this.paymentTime[0];
        endPayTime = this.paymentTime[1];
      } else {
        beginPayTime = null;
        endPayTime = null;
      }

      const queryParams = {
        ...this.queryParams,
        beginTime,
        endTime,
        payTypeList: this.queryParams.payType.join(),
        payType: null,
        // 支付时间开始时间
        beginPayTime,
        // 支付时间结束时间
        endPayTime,
      };

      // const time = timeComparison(
      //   "export",
      //   queryParams.beginTime,
      //   queryParams.endTime,
      //   queryParams.beginPayTime,
      //   queryParams.endPayTime
      // );
      // if (!time) return;

      this.$confirm("是否确认导出所有订单支付数据项?", "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(function () {
          return exportOrder(queryParams);
        })
        .then((response) => {
          this.download(response.msg);
        });
    },

    // 修改订单
    gotoEditOrderDiscount() {
      this.editDiscountDialog = true;
    },

    // 开票记录
    showInvoiceList(row) {
      this.currentRowData = row;
      this.invoiceDialog = true;
    },

    utmSourceFormatter(row, column, cellValue, index) {},
    getShowData() {
      let userLevel = this.userLevel;
      if (userLevel != null && !this.authUser) {
        let excludedIds = [3, 4, 7, 14, 26, 27, 13];
        let list = this.titleList.filter(
          (item) => !excludedIds.includes(item.id)
        );
        this.titleList = list;
      }
    },
    // 关闭自定义表头
    handleClose(done) {
      this.$confirm("确认关闭？")
        .then((_) => {
          done();
        })
        .catch((_) => {});
    },
    // 全选/全不选
    handleCheckAllChange(val) {
      this.checkedTitles = val ? this.titleList.map((item) => item.id) : [];
      this.isIndeterminate = false;
    },
    handleCheckedTitlesChange(value) {
      let checkedCount = value.length;
      this.checkAll = checkedCount === this.titleList.length;
      this.isIndeterminate =
        checkedCount > 0 && checkedCount < this.titleList.length;
    },
    handleCancel() {
      this.isDrawer = false;
    },
    // 获取自定义字段
    async getFields() {
      const res = await getOrderFields({ tableId: 2 });
      if (res && res.code == 0) {
        if (res.data.columnId) {
          let columnId = res.data.columnId;
          let list = columnId.split(",").map(Number);
          this.$nextTick(() => {
            this.checkedTitles = list;
            this.checkedTitles2 = list;
            let index = this.checkedTitles2.indexOf(6); // 获取数字6的索引
            if (index !== -1&&(this.checkedTitles.includes(30)||this.checkedTitles.includes(31))) {
              this.checkedTitles2.splice(index + 1, 0, 30, 31);
            }
            let index2 = this.checkedTitles2.indexOf(22); // 获取数字22的索引
            if (index2 !== -1 && this.checkedTitles.includes(32)) {
                this.checkedTitles2.splice(index2 + 1, 0, 32);
            }
            this.checkedTitles2 = Array.from(new Set(this.checkedTitles2));
          });
        } else {
          this.checkedTitles = [];
          this.checkedTitles2 = [];
          this.checkAll = false;
        }
      } else {
        this.$message.error(res && res.msg);
      }
    },
    //新增或编辑自定义字段
    async onEnsure() {
      this.checkedTitles = [...new Set(this.checkedTitles)].sort(
        (a, b) => a - b
      );
      const res = await addOrderFields({
        columnId: this.checkedTitles.join(","),
        tableId: 2,
      });
      if (res && res.code == 0) {
        await this.getFields();
        this.isDrawer = false;
        this.$message.success(res && res.msg);
        this.handleQuery();
      } else {
        this.$message.error(res && res.msg);
      }
    },
  },
};
</script>
<style lang="scss" scoped>
.app-container {
  margin-top: -15px;
}

.button-from {
  width: 100%;
  display: flex;
  flex-wrap: wrap;

  .button-style1 {
    display: inline-block;
    width: 80px;

    .el-button {
      margin: 0 0 0 15px;
    }
  }
}

::v-deep .card-table {
  padding: 10px;
  margin-top: 8px;
  background-color: #f8f8f8;

  .el-button {
    margin: 0 5px 0 0;
  }
}
.table2 {
  ::v-deep .el-table__empty-text {
    margin-top: 170px;
    font-size: 24px;
  }
}
.drawer_title {
  ::v-deep .el-drawer__header {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
  }
  ::v-deep .el-drawer__body {
    overflow-y: auto;
  }
}
.drawer_title2 {
  ::v-deep .el-drawer__header {
    font-size: 26px;
    font-weight: bold;
    color: #333;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
  }
  ::v-deep .el-icon-close:before {
    font-size: 26px;
    font-weight: bold;
  }
  ::v-deep .el-drawer__body {
    overflow-y: auto;
  }
  .drawer_content {
    .order_info {
      // padding: 0 20px;
      left: 50px;
      position: relative; /* 让 .order_info 元素相对定位，为了让伪元素相对于它定位 */
      font-size: 20px;
      color: #333;
      font-weight: bold;
    }
    .order_info::before,
    .order_info::after {
      content: ""; /* 设置内容为空，以便伪元素显示 */
      position: absolute; /* 将伪元素定位为绝对定位 */
      top: 50%; /* 将伪元素放置在中间位置 */
      width: 50%; /* 设置虚线的宽度 */
      border-top: 1px solid black; /* 设置虚线边框 */
    }
    .order_info::before {
      display: block;
      width: 90px;
      border: 1px solid black;
      left: -100px;
    }

    .order_info::after {
      width: 100%;
      left: 80px;
    }
    .el_form {
      padding-left: 50px;
    }
  }
  .close_btn {
    display: flex;
    justify-content: flex-end;
    p {
      width: 120px;
      text-align: center;
      padding: 10px 12.5px;
      border: 1px solid #666666;
      border-radius: 12px;
      font-size: 20px;
    }
  }
}
.action_btn {
  z-index: 99;
  position: fixed;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30%;
  background-color: #fff;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); /* 顶部阴影 */
  p {
    line-height: 45px;
    font-size: 18px;
    color: #333;
    font-weight: bold;
    padding: 5px 40px;
    border-radius: 12px;
    margin-bottom: 0px;
  }
  p:first-child {
    margin: 5px 0;
    background: #1990ff;
    color: #fff;
  }
  p:last-child {
    margin: 5px 0;
    margin-left: 20px;
    font-weight: normal;
    border: 1px solid #999999;
  }
}
.checkAll {
  margin-left: 20px;
  ::v-deep .el-checkbox__label {
    font-size: 18px;
    font-weight: 600;
    color: #333;
  }
  ::v-deep .el-checkbox__inner {
    width: 16px;
    height: 16px;
  }
}
.checkouBox_group {
  display: flex;
  flex-direction: column;
  margin-left: 30px;
  padding-bottom: 70px;
  ::v-deep .el-checkbox:nth-child(odd) {
    background-color: #f5f7fa;
  }
  ::v-deep .el-checkbox {
    padding: 10px 20px;
    margin-bottom: 0px;
  }
  ::v-deep .el-checkbox__label {
    font-size: 16px;
    color: #333;
  }
  ::v-deep .el-checkbox__inner {
    width: 16px;
    height: 16px;
  }
}
::v-deep .el-table {
  border: 1px #f8f8f8 solid;
  border-bottom: 1px #dfe6ec solid;
}

::v-deep .is-center {
  border: 1px transparent solid;
  border-bottom: 1px #f8f8f8 solid;
}

.order-fz {
  font-size: 13px;
}

.order-text-border {
  border-right: 1px solid #999999;
}

.order-text-color {
  color: #1990ff;
}
</style>
